import {ElLoading} from 'element-plus'
let loading = null;
//开启状态
export const startLoading = () =>{
    loading = ElLoading.service({
        Lock:true,
        text:'loading',
        background:'rgba(0, 0, 0, 0.7)' ,//loading的背景颜色
        target: 'body' //loading显示在容器
    });
};

export function endLoading(){
    if(loading){
        loading.close()
    }
}
